<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
    <meta name="applicable-device" content="pc"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta http-equiv="Cache-Control" content="no-transform"/>
    <title>${informationEntity.title } </title>
    <meta name="keywords" content="${informationEntity.abstractContent }"/>
    <meta name="description" content="${informationEntity.abstractContent } "/>
    <link href="<%=path %>/css/common1.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path %>/css/style.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" src="<%=path %>/js/jquery-1.12.4.min.js"></script>
	<script src="<%=path %>/js/global.js" type="text/javascript"></script>
	<script src="<%=path %>/js/adminStrotor.js?ver=1.01" type="text/javascript"></script>
	<link href="<%=path %>/bootstrap-3.3.5-dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <script src="<%=path %>/bootstrap-3.3.5-dist/js/bootstrap.js" type="text/javascript"></script>
	
<style>
		/**
父分类
**/
.blog-tabs {
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	margin: 10px 0 0;
	list-style: none;
	box-shadow: inset 0 -1px 0 0 #ddd;
	padding: 0px;
}

.blog-tabs .tab {
	width: 20%;
	cursor: pointer;
	text-align: center;
	color: #6a6a6a;
	margin-bottom: 1em;
}

.blog-tabs .tab.active {
	margin-bottom: 1px;
	position: relative;
}

.blog-tabs .tab.active:after {
	position: absolute;
	bottom: 0;
	display: block;
	width: 100%;
	height: 2px;
	content: '';
	background: #4eaa4c
}

.blog-tabs h1 {
	font-size: 1.35em;
	/*font-weight: 400;*/
	margin: 0
}

.blog-tabs .tab.active h1 {
	color: #4eaa4c;
}
.none_class{
	display: none;
}	

.box_div{
	    margin: 10px 20px;
}

.td_abstract{
	width: 50%;
}
.container {
    width: 100%;
}
	</style>
<script type="text/javascript">
	
	$(function(){
		$('#classify_coll li').on('click',function(){
			var currentLi = $(this);
			currentLi.addClass('active');
			var otherLi = $(this).siblings();
			otherLi.removeClass('active');
			var datatab = $(this).attr('datatab');
			$('#table_div_'+datatab).removeClass('none_class');
			$('#table_div_'+datatab).siblings().addClass('none_class');
		});
		var currentTab = $('#currentTab').val();
		$('#classify_coll li').eq(currentTab-1).click();
	});

</script>
  </head>
  
  <body>
   <!--头部-->
<jsp:include page="../include/head.jsp">
	<jsp:param value="content" name="head" />
</jsp:include>

<!--导航-->
<jsp:include page="../include/nav.jsp">
	<jsp:param value="content" name="nav" />
</jsp:include>

<div class="h10"></div>
<div class="h10"></div>

<!--美食推荐-->
<div id="tuijian" class="all_food_box">
	<div id="container" class="container bs-docs-container main_content">
		<div class="row">
			<div class="col-md-12" role="main">
			<input type="hidden" id="currentTab" value="${currentTab }"/>
				<ul class="box blog-tabs" id="classify_coll">
					<li class="tab classify_lab active" datatab="1" title="用户管理"><h1>用户管理</h1></li>
					<li class="tab classify_lab" datatab="2" title="资讯管理"><h1>资讯管理</h1></li>
					<!-- <li class="tab classify_lab active" datatab="3" title="回复"><h1>美食管理</h1></li> -->
				</ul>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12" role="main">
				<div class="box_div" id="table_div_1">
					<div class="">
						<input type="button" class="btn_primary btn_b" value="冻结用户" onclick="lockUser('<%=path %>')"/>
						<input type="button" class="btn_error btn_b" value="解冻用户" onclick="unLockUser('<%=path %>')"/>
					</div>
					<br/>
					
				<!-- 	<table  id="user_table" class="gridtable" > -->
					<table  id="user_table" class="table table-bordered table-hover" >
						<thead>
							<tr>
								<td class="td_id"><input type="checkbox" id="select_all_user"/></td>
								<td class="td_userName">用户名</td>
								<td class="td_nickName">昵称(商户名)</td>
								<td class="td_email">用户邮箱</td>
								<td class="td_roleId">用户类型</td>
								<td class="td_userType">用户状态</td>
							</tr>
						</thead>
						<tbody>
							<c:choose>
								<c:when test="${users ne null and fn:length(users)>0}">
									<c:forEach items="${users }" var="user">
										<tr>
											<td class="td_id td_check_u"><input type="checkbox" value="${user.userId }"/></td>
											<td class="td_userName">${user.userName }</td>
											<td class="td_nickName">${user.nickName }</td>
											<td class="td_email">${user.email }</td>
											<td class="td_roleId">
												<c:choose>
													<c:when test="${user.role.id  == '1'}">
														普通用户
													</c:when>
													<c:when test="${user.role.id  == '3'}">
														商户
													</c:when>
													<c:otherwise>
														管理员
													</c:otherwise>
												</c:choose>
											</td>
											<td class="td_userType">
												<c:choose>
													<c:when test="${user.userType  == '0'}">
														冻结
													</c:when>
													<c:otherwise>
														正常
													</c:otherwise>
												</c:choose>
											</td>
										</tr>
									</c:forEach>
								</c:when>
								<c:otherwise>
									无数据....
								</c:otherwise>
							</c:choose>
						</tbody>
					
					</table>
				</div>	
				<div class="box_div none_class" id="table_div_2">
					<div class="">
						<a href="<%=path %>/adminstrotor/addInformation" class="btn_primary btn_b">发布资讯</a>
						<a href="javascript:void(0)" class="btn_error btn_b" onclick="deleteInfo('<%=path %>')">删除资讯</a>
						
						<%-- <input type="button" class="btn_primary btn_b" value="发布资讯" onclick="releaseInfo('<%=path %>')"/> --%>
						<%-- <input type="button" class="btn_error btn_b" value="删除资讯" onclick="deleteInfo('<%=path %>')"/> --%>
					</div>
					<br/>
					<table id="information_table" class="table table-bordered table-hover" >
						<thead>
							<tr>
								<td class="td_id"><input type="checkbox" id="select_all_info"/></td>
								<td class="td_title">标题</td>
								<td class="td_abstract">摘要</td>
								<td class="td_createTime">创建时间</td>
								<td class="td_focus">访问量</td>
							</tr>
						</thead>
						<tbody>
							<c:choose>
								<c:when test="${informationEntities ne null and fn:length(informationEntities)>0}">
									<c:forEach items="${informationEntities }" var="information">
										<tr>
											<td class="td_id td_check_info"><input type="checkbox" id="select_all_info" value="${information.id }"/></td>
											<td class="td_title">${information.title }</td>
											<td class="td_abstract">${information.abstractContent }</td>
											<td class="td_createTime">${information.createTime }</td>
											<td class="td_focus">${information.focuse }</td>
										</tr>
									</c:forEach>
								</c:when>
								<c:otherwise>
									无数据....
								</c:otherwise>
							</c:choose>
						</tbody>
					
					</table>

				</div>	

			</div>
		</div>

	</div>

</div>





	<!--edit Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
					</button>
					<h4 class="modal-title" id="myModalLabel"></h4>
				</div>
				<div class="modal-body">
					<form id="doc_upload" class="form-horizontal" role="form"
						enctype="multipart/form-data" method="post"
						action="<%=path%>/document/translation/uploadDoc">
						<input type="hidden" name="isPreview" id="isPreview" /> <input
							type="hidden" name="id" id="docId" />

						<div class="form-group">
							<label for="docTitle" class="col-sm-2 control-label">文档名称</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" id="docTitle"
									name="docTitle" placeholder="请输入要生成的文档名称，不要超过90字">
							</div>
						</div>
						<div class="form-group">
							<label for="docAbstract" class="col-sm-2 control-label">文档摘要</label>
							<div class="col-sm-10">
								<textarea class="form-control" style="resize:none;" rows="4"
									id="docAbstract" name="docAbstract" placeholder="要生成的文档网页的摘要，不要超过450字。"
									required></textarea>
							</div>
						</div>
						<div class="form-group">
							<label for="docType" class="col-sm-2 control-label">文档分类</label>
							<div id="docType" class="col-sm-10">
								<label class="radio-inline"> <input type="radio"
									name="docType" value="0"> 国外翻译文档
								</label> <label class="radio-inline"> <input type="radio"
									name="docType" value="1"> 国内文档
								</label>
							</div>
						</div>
						<div class="form-group">
							<label for="isOriginal" class="col-sm-2 control-label">是否原创</label>
							<div id="isOriginal" class="col-sm-10">
								<label class="radio-inline"> <input type="radio"
									name="isOriginal" value="0"> 是
								</label> <label class="radio-inline"> <input type="radio"
									name="isOriginal" value="1"> 否
								</label>
							</div>
						</div>
						<div class="form-group">
							<label for="sourceUrl" class="col-sm-2 control-label">文档来源</label>
							<div class="col-sm-10">
								<input id="sourceUrl" type="text" class="form-control"
									id="sourceUrl" name="sourceUrl" placeholder="只有不是原创文章时需要填写文档来源">
							</div>
						</div>
						<div class="form-group">
							<label for="isOver" class="col-sm-2 control-label">是否完结</label>
							<div id="isOver" class="col-sm-10">
								<label class="radio-inline"> <input type="radio"
									name="isOver" value="0"> 已完结
								</label> <label class="radio-inline"> <input type="radio"
									name="isOver" value="1"> 未完结
								</label>
							</div>
						</div>
						<div class="form-group">
							<label for="isOver" class="col-sm-2 control-label">上传文档</label>
							<div class="col-sm-10">
								<button type="button" id="file_upload" class="btn btn-danger">选择要上传的文档</button>
								<input type="file" class="avatar-input" id="doc_file" required
									name="doc_file" style="display: none;" accept=".doc">
							</div>
						</div>

						<!-- <div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
							<button type="button" id="preview_btn" class="btn btn-warning">生成效果</button>
							<button type="submit" class="btn btn-info">提&nbsp;&nbsp;&nbsp;交</button>
						</div> -->
					</form>


				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" id="preview_btn" class="btn btn-warning">生成效果</button>
					<button type="button" id="submit_btn" class="btn btn-info">提&nbsp;&nbsp;&nbsp;交</button>
				</div>
			</div>
		</div>
	</div>










  </body>
</html>
